﻿using System.Data;

namespace ltModel.BLL
{
    /// <summary>
    /// 业务逻辑类TableDownload 的摘要说明。
    /// </summary>
    public class TableDownload
    {
        private readonly ltModel.DAL.TableDownload dal = new ltModel.DAL.TableDownload();
        public TableDownload()
        { }
        #region  成员方法
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(int id)
        {
            return dal.Exists(id);
        }

        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(ltModel.Model.TableDownload model)
        {
            return dal.Add(model);
        }

        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(ltModel.Model.TableDownload model)
        {
            return dal.Update(model);
        }

        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool Delete(int id)
        {
            return dal.Delete(id);
        }

        /// <summary>
        /// 删除数据
        /// </summary>
        public bool Delete(string ids)
        {
            return dal.Delete(ids);
        }

        /// <summary>
        /// 审核消审操作
        /// </summary>
        /// <param name="ids">ID</param>
        /// <param name="zt">状态</param>
        /// <returns></returns>
        public bool UpdateZT(string ids, string zt)
        {
            return dal.UpdateZT(ids, zt);
        }

        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public ltModel.Model.TableDownload GetModel(int id)
        {
            return dal.GetModel(id);
        }

        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetList(string strWhere)
        {
            return dal.GetList(strWhere);
        }
        /// <summary>
        /// 获得数据列表
        /// <param name="topNum">个数</param>
        /// <param name="strWhere">条件</param>
        /// </summary>
        public DataSet GetList(string topNum, string strWhere)
        {
            return dal.GetList(topNum, strWhere);
        }
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetAllList()
        {
            return dal.GetList("");
        }

        #endregion  成员方法
    }
}